package com.mlnx.work.dao.mysql;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mlnx.work.entity.ProjectDir;
import com.mlnx.work.pojo.dto.DateDTO;
import com.mlnx.work.pojo.form.ProjectFilterForm;
import com.mlnx.work.pojo.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * author name: amanda.shan
 * create time: 2020-12-28 16:58:01
 */
public interface ProjectDirMapper extends BaseMapper<ProjectDir> {

    List<MemberVO> selectMemberById(Integer dirId);

    ProjectVO selectProjectById(Integer dirId);

    List<ProjectListVO> selectProjectByMember(Integer memberId);

    List<ProjectListVO> selectAllProject();

    List<ProjectListVO> selectProjectByDept(Integer deptId);

    ProjectDetailVO selectProjectDetailById(Integer dirId);

    //无人员姓名时
    Page<ProjectTaskVO> selectProjectTask1(Page page, @Param("dateDTO") DateDTO dateDTO, @Param("filter") ProjectFilterForm projectFilterForm);

    //有人员姓名时
    Page<ProjectTaskVO> selectProjectTask2(@Param("memberId") Integer memberId, Page page, @Param("dateDTO") DateDTO dateDTO, @Param("filter") ProjectFilterForm projectFilterForm);

    ProjectTaskVO selectProjectTask3(@Param("id") Integer id);

    Page<CommonProjectVO> selectProjectRoot(Page page, @Param("dateDTO") DateDTO dateDTO);

    Page<CommonProjectVO> selectProjectDir(Page page, @Param("dirId") Integer dirId);

    Page<CommonProjectVO> selectProjectTask(Page page, @Param("taskId") Integer taskId);
}

